//
//  VegetableButton.m
//  Cook
//
//  Created by 0.0 on 15-4-22.
//  Copyright (c) 2015年 dingjun. All rights reserved.
//

#import "VegetableButton.h"

//#define VBNameLabelHigth 20
@implementation VegetableButton

- (void)dealloc
{
    [_VBImageView release];
    [_VBNameLabel release];
    
    [super dealloc];
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    
    if (self) {
//        self.VBImageView = [[UIImageView alloc] initWithFrame:CGRectMake(10, 5, frame.size.width - 20, frame.size.height - 10 - VBNameLabelHigth)];
//        self.VBNameLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, _VBImageView.frame.origin.y + _VBImageView.frame.size.height + 5, frame.size.width, VBNameLabelHigth)];
        self.VBNameLabel = [[UILabel alloc] initWithFrame:self.bounds];
//        self.VBImageView.backgroundColor = [UIColor redColor];
//        self.VBNameLabel.backgroundColor = [UIColor greenColor];
        
        [self addSubview:_VBImageView];
        [self addSubview:_VBNameLabel];
        
        [_VBNameLabel release];
        [_VBImageView release];
    }
    
    return self;
}

@end
